'##############
'fortochka_pass_anim_11-Script
'by FRENZYMAX
'18:11 10.04.2011
'##############

{trigger:cp_fortochka_pass_anim_11_opn_drag}

	(L.L.cp_fortochka_pass_anim_11_pos) (S.L.cp_fortochka_pass_anim_11_lastpos)

	(L.S.mouse_x) 500 / (L.L.cp_fortochka_pass_anim_11_pos) + (S.L.cp_fortochka_pass_anim_11_pos) s0
	l0 0 <
	{if}
		0 (S.L.cp_fortochka_pass_anim_11_pos)
		(L.L.cp_fortochka_pass_anim_11_endanschlag) !
		{if}
			(T.L.ev_fahrerfenster_cls)
		{endif}
		1 (S.L.cp_fortochka_pass_anim_11_endanschlag)
		
	{endif}
	l0 1 >
	{if}
		1 (S.L.cp_fortochka_pass_anim_11_pos)
		(L.L.cp_fortochka_pass_anim_11_endanschlag) !
		{if}
			(T.L.ev_fahrerfenster_opn)
		{endif}
		1 (S.L.cp_fortochka_pass_anim_11_endanschlag)
	{endif}

	(L.L.cp_fortochka_pass_anim_11_pos) s0 0 > l0 1 < &&
	{if}
		0 (S.L.cp_fortochka_pass_anim_11_endanschlag)
	{endif}


	(L.L.cp_fortochka_pass_anim_11_pos) (L.L.cp_fortochka_pass_anim_11_lastpos) - abs (L.S.Timegap) / (S.L.cp_fahrerfenster_speed)
{end}


{trigger:cp_fortochka_pass_anim_11_opn_off}
	0 (S.L.cp_fortochka_pass_anim_11_speed)
{end}